var app = getApp()
var IP = app.globalData.IP

Page({

  data: {
    // banner
    imgUrls: [
      '/images/recycle/banner-1.png',
    ],


    serviceList: [],

    //步骤条
    steps: [{
   
        desc: '用户下单',
        inactiveIcon: 'arrow'

      },
      {

        desc: '免费上门',
        inactiveIcon: 'arrow'

      },
      {
  
        desc: '检测估价',
        inactiveIcon: 'arrow'
      },
      {
    
        desc: '极速到账',
        inactiveIcon: 'arrow'
      }
    ],
  },




  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

    this.getservicelist()

  },


  getservicelist() {
    wx.request({
      url: `http://${IP}:8080/service/getservicelistbycategory/` + 1,
      success: res => {
        this.setData({
          serviceList: res.data
        })
        console.log(this.data.serviceList)
      }
    })
  },

})